######################################################
#Figure D5: Public Swiss Social Spending (%GDP)
#Author: Raluca L. Pahontu
#####################################################

data_spending <- read.dta13("swiss_spending_oecd_data.dta") 

spend <- ggplot(data=subset(data_spending, year<=1999), aes(x=year, y=spending)) 
spend +   
  geom_line(linetype="dashed") + 
  ylab ("Social Spending (% GDP)") + 
  xlab("Year") + 
  geom_line(data=subset(data_spending, year>=1999 ), aes(x=year, y=spending)) + 
  geom_vline(xintercept=c(1999), linetype="solid", color="black") + 
  coord_cartesian(ylim=c(0,25)) +
  scale_y_continuous(limits = c(0,25),  expand = c(0,0), oob=rescale_none) + 
  scale_x_continuous(breaks = c(1980, 1985, 1990, 1995, 1999, 2005, 2010, 2015))  + theme_bw()
ggsave(file="figure_d5.eps")


